/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ie.tcd.cs.railtickets.server.dao;

import ie.tcd.cs.railtickets.server.domain.RouteStation;
import ie.tcd.cs.railtickets.server.domain.RouteTime;
import ie.tcd.cs.railtickets.server.domain.SeatState;
import java.util.Date;
import java.util.List;

/**
 *
 * @author Wenbo Sun
 */
public interface SeatStateDAO extends BaseDAO {

    public SeatState findBy(RouteTime routeTime, Date travelDate, RouteStation routeStation);

    public int findAvailable(RouteTime routeTime, Date travelDate, int... stationSequence);

    public void bookOrCancel(SeatState seatState, int op);

    public void bookOrCancel(List<SeatState> seatStates, int op);

    public SeatState create(RouteTime routeTime, Date travelDate, RouteStation routeStation);

    public boolean isExist(RouteTime routeTime, Date travelDate, RouteStation routeStation);

}
